package org.example.softwarearchitecture.dox;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.ReadOnlyProperty;

import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class User{

    public static final int USER = 1;
    public static final int ADMIN = 10;

    @Id
    @CreatedBy
    private Integer id;
    private String account;
    @JsonProperty(access =  JsonProperty.Access.WRITE_ONLY)
    private String password;
    private Integer role;

    public User orElse(Object o) {
        return null;
    }
}
